*************************************************************
* Title: 0_homedir											*
* Authors: Peter Kuhn, Trevor Osaki, Lei Yue                *
* Purpose: Set up directories for data analyses             *
* Date: September 2024                                      *
*************************************************************


******** Set the home directory for replication pakage ******

* To set the home directory, enter the following command:
	// global homedir ""[path to the home directory on your computer]""
	* PLEASE NOTE THE PAIRED QUOTATION MARKS before and after the path.
	
* If you like, you can just modify the following command, which I use on my computer (this works on Peter's home and work desktops):
	// global homedir ""C:\Users\Peter Kuhn\Dropbox\When is Discrim Unfair\PK Replication Files\2_Main Analyses""  
	// global homedir "C:\Users\trevo\OneDrive\Documents\UCSB\Research Projects\When is discrimination unfair\Data"


version 16

global homedir ""/Users/leiyue/Desktop/Projects/WhenIsDicrimUnfair/Replication_Final/2_Main Analyses""  
cd $homedir

set scheme s1color // with white background for figures

****************************************************************
* check the contents of your home directory:

	dir


	*It should contain the following files: 

	  *	0_homedir.do [this file]
	  *	1_master.do 
	  * 2_prep_acs.do
	  * 2_prep_gss.do
	  *	3_figures.do
	  *	4_tables.do
	  *	5_pre_analysis_plan.do

	  *	d1_when_is_discrimination_unfair_data_set.dta
	  *	d2_google_trends.dta
	  * d3_acs2019.dta
	  * d4_gss2020.dta
	  * d5_acs2019_analysis.dta
	  * d6_gss2020_analysis.dta
	  * d7_state_pop.dta
	  * d8_open_response_handlabels.csv 

	  * _Readme_2_Main Analyses.docx


* Create folders (Figures, Tables, PAP) to store results

	cap mkdir "Figures"
	cap mkdir "Figures/tmp"
	cap mkdir "Tables"
	cap mkdir "PAP"

* Packages installation

	cap which coefplot
		if _rc ssc install coefplot
		
	cap which outreg2
		if _rc ssc install outreg2
	
	cap which estout
		if _rc ssc install estout
	
	// install grc1leg from search
	cap which grc1leg
		if _rc search grc1leg
		
